﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageUser.master" AutoEventWireup="true" CodeFile="NewsDetails.aspx.cs" Inherits="NewsDetails" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <h2>
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' /></h2>
            
            <asp:Label ID="ContentLabel" runat="server" Text='<%# Eval("Content") %>' />
            <br />
            <br />
            <h3>
            <asp:Label ID="CreateDateLabel" runat="server" 
                Text='<%# Eval("CreateDate") %>' /></h3>
            <br />
            <br />
        </ItemTemplate>
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connString %>" 
        SelectCommand="SELECT [Title], [Content], [CreateDate] FROM [News] WHERE ([NewsId] = @NewsId)">
        <SelectParameters>
            <asp:QueryStringParameter Name="NewsId" QueryStringField="NewsId" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

</asp:Content>

